package com.elysia.newsservice.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "file-service")
public interface FileFeignClient {
    @GetMapping("/files")
    String getFileUrl(@RequestParam String fileKey, @RequestParam int expireSeconds);
    /**
     * 删除文件
     * @param fileKey 文件key
     */
    @DeleteMapping("/files")
    void deleteFile(@RequestParam String fileKey);
}
